var blog = document.location.hostname;
var slug = document.location.pathname;

// split method doesn't work with the chrome browser
// Looks like it interprets the input string as a regexp
// and splits into separate symbols
//
/*
var name = blog.split(".");

if (name[name.length-1] != "com") {
  var ncr = name[0] + ".blogspot.com/ncr";
  window.location.replace ("http://" + ncr + slug);
}
*/
//debugger;
//var domain = blog.substr(blog.lastIndexOf(".")); 
//var blogname = blog.substr(0, blog.indexOf("."));
if (blog.substr(blog.lastIndexOf("."))!=".com") {
  var ncr = blog.substr(0, blog.indexOf(".")) + ".blogspot.com/ncr"
  window.location.replace ("http://" + ncr + slug);
}

